/* jshint indent: 1 */

module.exports = function(sequelize, DataTypes) {
	return sequelize.define('loginHistory', {
		id: {
			type: DataTypes.BIGINT,
			allowNull: false,
			primaryKey: true,
			autoIncrement: true,
			field: 'id'
		},
		createUid: {
			type: DataTypes.STRING(20),
			allowNull: true,
			field: 'create_uid'
		},
		operationType: {
			type: DataTypes.INTEGER(2),
			allowNull: true,
			defaultValue: '1',
			field: 'operation_type'
		},
		createdAt: {
			type: DataTypes.DATE,
			allowNull: true,
			field: 'created_at'
		},
		updatedAt: {
			type: DataTypes.DATE,
			allowNull: true,
			field: 'updated_at'
		}
	}, {
		tableName: 'login_history'
	});
};
